package com.ysstech.common.entity;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 系统菜单信息表
 * </p>
 *
 * @author lishuangliang
 * @since 2021-01-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("yss_menu")
public class Menu extends Model<Menu> {

    private static final long serialVersionUID = 1L;

    /**
     * 菜单编号
     */
    @TableId("ID")
    private String id;

    /**
     * 菜单类型
     */
    @TableField("TYPE")
    private String type;

    /**
     * 菜单名称
     */
    @TableField("NAME")
    private String name;

    /**
     * 菜单级别
     */
    @TableField("LEVEL")
    private Integer level;

    /**
     * 菜单序号
     */
    @TableField("SEQUENCE")
    private Integer sequence;

    /**
     * 上级菜单编码
     */
    @TableField("PARENT_ID")
    private String parentId;

    /**
     * 菜单图标
     */
    @TableField("ICON")
    private String icon;

    /**
     * 菜单对应url
     */
    @TableField("URL")
    private String url;
    /**
     * 权限编码
     */
    @TableField("PERMISSIONS")
    private String permissions;
    /**
     * 状态
     */
    @TableField("STATUS")
    private Integer status;
    /**
     * 添加时间
     */
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    @TableField("ADD_TIME")
    private LocalDateTime addTime;

    /**
     * 添加用户
     */
    @TableField("ADD_USER")
    private String addUser;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    @TableField("EDIT_TIME")
    private LocalDateTime editTime;

    /**
     * 修改用户
     */
    @TableField("EDIT_USER")
    private String editUser;

    @Override
    protected Serializable pkVal() {
        return null;
    }

}
